package com.lovemanai.test;

import java.sql.SQLException;

import org.apache.commons.dbutils.QueryRunner;

import com.lovemanai.tools.jdbc.TxQueryRunner;

public class UserDao {
	
	public static void update(String username, double money) throws SQLException {
		QueryRunner qr = new TxQueryRunner();
		String sql = "update user set balance = balance + ? where username = ?";
		Object[] params = {money, username};
		qr.update(sql, params);
	}
}
